package com.allin.mall.common.core.api;


public enum ResultCodeEnum implements IResultCode {

    SUCCESS(200, "success"),

    NOT_FOUND(404, "not found"),
    SYSTEM_ERROR(500, "system error"),
    TRY_LOCK_TIMEOUT(501, "try lock timeout"),
    ;

    private final Integer code;

    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public Integer getCode() {
        return code;
    }
}
